package main

import (
	"google.golang.org/grpc"
	"net"
	"rpc_demo/rpc_demo/handler"
	"rpc_demo/rpc_demo/proto"
)

func grpcHello() {
	server := grpc.NewServer()
	proto.RegisterHellolloServiceServer(server, &handler.HelloSer{})
	listen, err := net.Listen("tcp", ":8090")
	if err != nil {
		panic(listen)
		return
	}
	server.Serve(listen)
}

func main() {

	grpcHello()
}
